<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta name="format-detection" content="telephone=no" />
    <title>承接合约包详情</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #fff;
            font-size: 0.26rem;
            padding-top: 0rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: Helvetica;
            color: #333333;
        }

        .testFix {
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1;
        }

        .head {
            width: 100%;
            height: 0.88rem;
            background-color: #ffffff;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            border-bottom: 1px solid #f5f5f5;
            position: relative;
        }

        head {
            position: relative;
        }

        .head img {
            width: 0.21rem;
            height: 0.36rem;
            margin-left: 0.26rem;
            position: absolute;
            z-index: 1;
            left: 0;
            margin: 0;
            padding: 0 0.26rem;
            top: 50%;
            margin-top: -0.18rem;
        }

        .head_title {
            font-size: 0.35rem;
            color: #333333;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            display: inline-block;
            width: 100%;
            text-align: center;
        }

        .showimg {
            width: 100%;
            height: 4.22rem;
        }

        .showimg img {
            width: 100%;
            height: 4.22rem;
        }

        .machine-detail {
            width: 6.9rem;
            /* height: 2.25rem; */
            margin: auto;
            border-bottom: 1px solid #f5f5f5;
        }

        .machine-detail-up {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            justify-content: space-between;
            -webkit-justify-content: space-between;
        }

        .up-left {
            margin-top: 0.14rem;
            height: auto;
            flex: 1;
        }

        .machine-preice {
            height: 0.76rem;
            font-size: 0.26rem;
            color: #ffd203;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            border-bottom: 1px solid #f7f7f7;
        }

        .machine-preice span {
            font-size: 0.52rem;
        }

        .machine-name {
            height: 1.2rem;
            font-size: 0.32rem;
            /* line-height: 1.3rem; */
            color: #181818;
            margin-top: 0.08rem;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .machine-type {
            height: auto;
            border: 1px solid #ffd203;
            overflow: hidden;
            border-radius: 0.07rem;
        }

        .machine-type>span {
            padding: 0.02rem 0;
        }

        .up-right {
            height: 1.34rem;
            display: flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: flex-end;
            -webkit-align-items: flex-end;
        }

        .machine-type span {
            width: 0.6rem;
            height: 0.32rem;
            text-align: center;
            font-size: 0.2rem;
            background-color: #ffd203;
            border-radius: 0 0 0.05rem 0.05rem;
            display: block;
            line-height: 0.35rem;
        }

        .machine-detail-down {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-wrap: wrap;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
            color: #616161;
            font-size: 0.26rem;
            padding-bottom: 0.2rem;
        }

        .machine-detail-down p {
            height: 0.6rem;
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            -webkit-justify-content: flex-start;
            align-items: center;
            -webkit-align-items: center;
        }

        .machine-detail-down p {
            width: 50%;
        }

        /* .machine-detail-down p:nth-of-type(even) {
            width: 50%;
        } */

        /* .machine-detail-down p:nth-of-type(odd)>span:first-of-type {
            display: inline-block;
            width: 2.2rem;
            height: 100%;
            line-height: 0.6rem;
        } */

        .machine-detail-down p>span:first-of-type {
            color: #7e7e7e;
            margin-right: 0.4rem;
        }

        .leftTabActive {
            font-size: 0.24rem;
            display: inline-block;
            width: 1.53rem;
            height: 0.58rem;
            background-color: #fbd06b;
            line-height: 0.58rem;
            text-align: center;
            color: white;
            border: 1px solid #fbd06b;
            border-radius: 0.1rem 0 0 0.1rem;
        }

        .rightTabActive {
            font-size: 0.24rem;
            display: inline-block;
            width: 1.53rem;
            height: 0.58rem;
            background-color: #fbd06b;
            line-height: 0.58rem;
            text-align: center;
            color: white;
            border: 1px solid #fbd06b;
            border-radius: 0 0.1rem 0.1rem 0;
        }

        .data-detail {
            background-color: white;
            /* margin-top: 0.18rem; */
            padding: 0 0.24rem;
            height: auto;
            box-sizing: border-box;
            padding-bottom: 0.25rem;
        }

        .data-detail ul {
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            box-sizing: border-box;
            margin-top: 0.2rem;
        }

        .data-detail li {
            color: #616161;
            margin-top: 0.1rem;
        }

        .data-detail li:first-of-type {
            margin-top: 0.2rem;
        }

        .data-detail li span {
            font-size: 0.26rem;
            /* color: black; */
        }

        .next {
            margin: auto;
            /* background-color: #f9af00; */
            color: #181818;
            height: 0.9rem;
            background-color: #ffd203;
            /* background: url(../image/my/next.png) center 0 no-repeat; */
            background-size: 100% 100%;
            line-height: 0.9rem;
            text-align: center;
            width: 80%;
            /* border-radius: 0.3rem; */
            margin-top: 0.2rem;
        }

        .inputNull {
            /* background: url(../image/btn_bg.png) no-repeat center; */
            background-color: #ffd203;
            line-height: 0.9rem;
            border-radius: 0.05rem;
            background-size: cover;
        }

        .inputNotNull {
            background-color: #e5e5e5;
            line-height: 0.9rem;
            border-radius: 0.05rem;
            background-size: cover;
        }

        .rentNum {
            padding: 0 0.24rem;
            height: 0.7rem;
            font-size: 0.26rem;
            box-sizing: border-box;
            color: #999999;
            display: flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .rent-detail-list {
            margin-top: 0.9rem;
            display: none;
        }

        table {
            width: 100%;
            height: auto;
            padding: 0 0.24rem;
            box-sizing: border-box;
            background-color: #fff;
        }

        table td {
            text-align: center;
        }

        table thead tr {
            height: 1.06rem;
            vertical-align: middle;
        }

        table thead tr td {
            height: 1.06rem;
            vertical-align: middle;
            font-size: 0.28rem;
        }

        .test {
            margin: auto;
            text-align: center;
            margin-top: 0.4rem;
        }

        #fixBtn {
            border-top: 0.01rem solid #f5f5f5;
            width: 100%;
            height: 1.2rem;
            position: fixed;
            bottom: 0;
            left: 0;
        }

        .bottomForce {
            padding: 0 0.24rem;
            border-top: 0.2rem solid #f7f7f7;
            border-bottom: 0.2rem solid #f7f7f7;

        }

        .bottomForce p {
            padding: 0.3rem 0;
        }

        .bottomForce p>span:nth-child(2) {
            color: #888888;
            font-size: 0.26rem;
        }

        .bottomForce p {
            border-bottom: 0.01rem solid#f5f5f5;
        }

        .showWindow {
            position: relative;
        }

        .showWindow>img {
            height: 0.36rem;
            float: right;
            position: absolute;
            right: 0.2rem;
            top: 50%;
            margin-top: -0.18rem;
        }

        .cover {
            background: rgba(0, 0, 0, 0.5);
            position: fixed;
            z-index: 2;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
        }

        .textCenter {
            text-align: center;
        }

        .window {
            position: fixed;
            z-index: 3;
            top: 50%;
            left: 50%;
            width: 4.8rem;
            margin-left: -2.4rem;
            margin-top: -2.77rem;
            border-radius: 0.12rem;
            font-size: 0.3rem;
            overflow: hidden;
        }

        .reward {
            padding: 0.4rem 0;
            background: #ffd203;
            font-size: 0.26rem;
            padding-bottom: 0.32rem;
        }

        .rewardNum {
            font-size: 0.45rem;
        }

        .flexStyle {
            display: flex;
            display: -webkit-flex;
            display: -webkit-flex;
            justify-content: center;
            -webkit-justify-content: center;
            align-items: center;
            -webkit-align-items: center;
        }

        .flexContentleft {
            justify-content: flex-start;
            -webkit-justify-content: flex-start;
        }

        .windowList {
            padding: 0.45rem 0.75rem;
        }

        .windowList>p {
            height: 0.75rem;
            display: flex;
            display: -webkit-flex;
            display: -webkit-flex;
            justify-content: space-between;
            -webkit-justify-content: space-between;
            align-items: center;
            -webkit-align-items: center;
        }

        .windowList>p>span:first-child {
            color: #696969;
        }

        .closeWindow {
            position: fixed;
            z-index: 4;
            top: 50%;
            margin-top: 3.8rem;
            left: 50%;
            display: inline-block;
            margin-left: -0.375rem;
        }

        .closeWindow>img {
            width: 0.65rem;
        }

        .stopRent {
            text-align: center;
            width: 100%;
            margin-top: 0.4rem;
        }

        .stopRent>button {
            width: 6.9rem;
            border-radius: 0.08rem;
            background: #ffd203;
            color: #181818;
            font-size: 0.35rem;
            border: 0;
            margin: 0 auto;
            height: 1rem;
            outline: none;
        }

        #stopRent {
            text-align: center;
            padding-top: 0.2rem;
            width: 100%;
            margin-top: 0.1rem;
        }

        #stopRent>button {
            width: 6.9rem;
            border-radius: 0.08rem;
            background: #ffd203;
            color: #181818;
            font-size: 0.35rem;
            border: 0;
            margin: 0 auto;
            height: 1rem;
            outline: none;
        }

        #stopRent>.hasStop {
            width: 6.9rem;
            font-size: 0.35rem;
            border: 0;
            margin: 0 auto;
            height: 1rem;
            outline: none;
            background: #e1e1e1;
            border-radius: 0.1rem;
            color: #181818;
        }

        .intrduction {
            /* padding: 0 0.24rem; */
            background-color: white;
            margin-top: 0.2rem;
            box-sizing: border-box;
            width: 100%;
            height: auto;
            padding-bottom: 0.24rem;
        }

        .intrduction ul li {
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            -webkit-flex-direction: column;
            padding: 0 0.25rem;
        }

        .intrduction ul li p {
            height: 1.12rem;
            color: #fabf38;
            font-size: 0.3rem;
            line-height: 1.12rem;
            /* padding: 0 0.24rem; */
        }

        .intrduction ul li div {
            margin: 0;
            padding: 0;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            -webkit-align-items: center;
            box-sizing: border-box;
            padding: 0.1rem 0.38rem 0.1rem 0.4rem;
            background-size: cover;
            border: 1px solid #f5f5f5;
            border-radius: 0.05rem;
        }

        .goprice span {
            display: inline-block;
            height: 0.9rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        #showother {
            position: absolute;
            display: block;
            top: 0.6rem;
            right: -2.6rem;
            background-color: #ffd100;
            border-radius: 0.1rem;
            font-size: 0.22rem;
            padding: 0.2rem;
            padding-right: 0.3rem;
            width: auto;
            height: auto;
            font-weight: 600;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            z-index: 100;
            color: #262626;
        }

        #showother::after {
            position: absolute;
            top: -0.26rem;
            left: 1.6rem;
            display: block;
            content: '';
            width: 0;
            border-width: 0.15rem 0.15rem 0.15rem 0.15rem;
            border-style: solid;
            border-color: transparent transparent #ffd100 transparent;
            z-index: 100;
        }

        #showother span:last-of-type {
            font-size: 0.22rem;
            margin-top: 0.1rem;
        }
    </style>
</head>

<body>
    <div id="box" class="switchbutton">
        <div class="data-detail">
            <div class="machine-detail">
                <div class="machine-detail-up">
                    <div class="machine-name">
                        <span class="name-th">算力合约包 </span>
                        <div class="machine-type">
                            <span></span>
                            <!-- <span class="isAlive">活期</span> -->
                        </div>
                    </div>
                    <div class="machine-preice">
                        <span style="height: 0.76rem;">
                            <span style="font-size: 0.26rem;padding-right: 0.15rem;color: #999999;">转让金额</span>
                            <span class="deposit">--</span>
                            <span class="unit" style="font-size: 0.26rem;padding-right: 0.15rem"></span>
                        </span>
                        <p style="display:flex;align-items: center;">
                            <span id="showVoucher"
                                style="display:inline-block;width:1.1rem;height:0.34rem;line-height: 0.34rem;background:#edfff2;color:#80d699;font-size:0.19rem;text-align: center;border-radius:0.05rem;display: none;">已司法存证</span>
                            <span id="showtime"
                                style="display:inline-block;padding: 0.03rem 0.1rem;height:0.34rem;line-height: 0.34rem;background:#ffe3e6;color:#ff6678;font-size:0.19rem;text-align: center;border-radius:0.05rem;display: none;">
                                即将到期
                            </span>
                        </p>
                    </div>
                    <div class="machine-detail-down">
                        <p class="stopRentPower"><span>转让BTC算力</span><span class="transsPower">0</span></p>
                        <p><span>单价</span><span class="goodsDeposit">0 CNY</span></p>
                        <p class="stopRentPower showBhppowerNum" style="display: none;"><span>转让BHP参配算力</span><span
                                class="transsbhpPower">0</span></p>
                        <p class="daylimit"><span>锁定期限</span> <span>30天起</span></p>
                        <p><span>转让人</span> <span class="disnum">xx</span></p>
                        <p><span>转让时间</span><span class="tranferTime">0000-00-00</span></p>
                    </div>
                </div>
            </div>
            <ul>
                <li>
                    分币比例
                    <span style="margin-left: 0.72rem;color: #FF6868;" class="getStyledisRate">--</span>
                </li>
                <li>
                    发币方式
                    <span style="margin-left: 0.72rem;" class="getStyle">日结，次日发放至账户</span>
                </li>
                <li>
                    开挖时间
                    <span style="margin-left: 0.72rem;" class="BeginrunningDate">承接次日开挖</span>
                </li>
                <li>
                    算力来源
                    <span style="margin-left: 0.72rem;" class="calculateSource"></span>
                </li>
            </ul>
        </div>
        <div class="bottomForce">
            <p style="width: 100%;display:flex;display:-webkit-flex;justify-content: space-between;">
                <span>基础算力</span><span class="basepowerNum">1T/份</span></p>
        </div>
    </div>
    <p style="color: #ff6868;width:6.9rem;margin-left:calc((100% - 6.9rem) / 2);margin-top:0.4rem;line-height: 0.5rem;">
        风险提示: 承接合约包若再次转让,则等值公允价格挂单会在30分钟成交,溢价挂单风险自担。
    </p>
    <div class="stopRent" id="reButton">
        <button id="relet">立即承接</button>
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/app.js"></script>
    <script>
        apiready = function () {
            var app = new APP();
            var account = app.getAccount();
            var machineId = api.pageParam.machineID; //订单ID
            var argmennt = {};//协议信息
            var is_captcha = 0; //是否支持验证 0 不支持 
            var refour = /([0-9]+\.[0-9]{4})[0-9]*/;
            var re = /([0-9]+\.[0-9]{2})[0-9]*/;
            var myUseMoney = {
                myRmb: "",
                myBcny: "",
                myUsdt: ""
            } //我的余额
            var machineDetail = {};
            app.specialCoin(account, function (ret, err) {
                if (ret.code == 200) {
                    myUseMoney.myBcny = app.sliceNum(ret.data.lists.BCNY, 2);
                    myUseMoney.myUsdt = app.sliceNum(ret.data.lists.USDT, 4);
                    myUseMoney.myRmb = app.sliceNum(ret.data.lists.CNY, 2);
                }
            });
            app.ajaxPro({
                url: "transfer/lists",
                values: {
                    token: account.token,
                    orderId: machineId
                },
                openFlower: true
            }, function (ret) {
                if (ret.code == 200) {
                    machineDetail = ret.data.list[0];
                    is_captcha = machineDetail.is_tongdun_on;
                    $(".calculateSource").text(machineDetail.powerNodeName);
                    $(".disnum").text(machineDetail.fromUsername.length > 10 ? (machineDetail.fromUsername.slice(0, 6) + "…") : machineDetail.fromUsername);
                    if (machineDetail.operateTime) {
                        $(".tranferTime").text(machineDetail.operateTime.split(" ")[0]);
                    }
                    if (machineDetail.isBhpPos == 1) {
                        $(".showBhppowerNum").show();
                        $(".transsbhpPower").text(app.accMul(machineDetail.num, machineDetail.bhpPower) + "T");
                    }
                    $(".transsPower").text(app.accMul(machineDetail.num, machineDetail.basePower) + "T");
                    $(".getStyledisRate").text(app.accMul(machineDetail.distributionRate, 100) + "%");
                    $(".unit").text(machineDetail.paymentCurrencyCode);
                    $(".name-th").text(machineDetail.productName);
                    $("#showDialog").click(function () {
                        $("#showother").show();
                    })
                    $("#showother").click(function () {
                        $(this).hide();
                    })
                    var productDepositNum = app.accDiv(machineDetail.productDeposit, machineDetail.basePower);
                    if (machineDetail.paymentCurrencyCode == "USDT") {
                        $(".deposit").text(app.sliceNum(machineDetail.totalDeposit, 4));
                        $(".goodsDeposit").text(app.sliceNum(productDepositNum, 4) + " USDT/T");
                    } else {
                        $(".deposit").text(app.sliceNum(machineDetail.totalDeposit, 2));
                        $(".goodsDeposit").text(app.sliceNum(productDepositNum, 2) + " " + (machineDetail.paymentCurrencyCode == "BCNY" ? "CNY" : machineDetail.paymentCurrencyCode) + "/T");
                    }
                    if (machineDetail.isBhpPos == 1) {
                        $(".machine-type").css({
                            width: "auto",
                            borderColor: "#dee3ff"
                        });
                        $(".machine-type span").css({
                            width: "auto",
                            borderColor: "#dee3ff",
                            padding: "0 0.1rem"
                        });
                        $(".machine-type span:last-of-type").css({
                            backgroundColor: "#dee3ff"
                        });
                    }
                    $(".basepowerNum").text(machineDetail.basePower + "T/份");
                    $(".machine-type span:first-of-type").text(machineDetail.isBhpPos == 0 ? "BTC" : "BTC+BHP");
                } else {
                    app.toast(ret.message);
                }
            });
            $("#relet").on("click", function () {
                var pageValue = {
                    name: "paymethod",
                    subpage: "fisrt/paymethod",
                    title: "支付方式",
                    param: {
                        pageName: "paymethod",
                        machineId: machineId,
                        machineDetail: machineDetail,
                        myUseMoney: myUseMoney,
                        is_captcha: is_captcha,
                        argmennt: argmennt
                    }
                }
                app.setNavBarAttr(pageValue);
            })
            app.listen("goTranfer", function () {
                setTimeout(function (params) {
                    app.closeW();
                }, 1000)
            })
            app.listen("overTakingDialog", function () {
                var param = {
                    dtype: "dialog37"
                };
                app.dialog(param);
            });
            app.headerMap(function (ret) {
                if (ret.eventTrigger) {
                    app.trigger(ret.eventTrigger);
                }
            });
        };
    </script>
</body>

</html>